/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.eb.entity;

import org.hibernate.validator.constraints.Length;

import java.util.Date;

import javax.validation.constraints.NotNull;

import com.kaaction.common.persistence.DataEntity;
import com.kaaction.modules.market.entity.Event;

/**
 * 商品Entity
 * @author zengbiao
 * @version 2017-04-19
 */
public class Product extends DataEntity<Product> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 产品名称
	private String type;		// 促销类型
	private String isProduct;		// 商品类型
	private String code;		// 商品编码
	private String keywords;		// 关键词
	private String status;		// 是否上架
	private Integer inventory;		// 库存
	private Integer basicNum;		// 基础销量
	private Double marketPrice;		// 定价
	private Double marketPriceForShow;		// 展示给用户的定价
	private Double costPrice;		// 成本价
	private Double salePrice;		// 打折的价格
	private Double sellPrice;		// 真实销售的价格
	private String cover;		// 商品封面图片
	private String covers;		// 商品封面轮播图
	private String detailImages;		// 商品详情图
	private String isShow;		// 是否在电商页面中展现0=显示1=不显示
	
	private String classifyIds;
	
	private Date eventStartDate;
	private Date eventEndDate;
	
	private Event event;
	
	public Product() {
		super();
	}

	public Product(String id){
		super(id);
	}

	public Date getEventStartDate() {
		return eventStartDate;
	}

	public void setEventStartDate(Date eventStartDate) {
		this.eventStartDate = eventStartDate;
	}

	public Date getEventEndDate() {
		return eventEndDate;
	}

	public void setEventEndDate(Date eventEndDate) {
		this.eventEndDate = eventEndDate;
	}

	@Length(min=0, max=200, message="产品名称长度必须介于 0 和 200 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=5, message="促销类型长度必须介于 0 和 5 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=1, max=5, message="商品类型长度必须介于 1 和 5 之间")
	public String getIsProduct() {
		return isProduct;
	}

	public void setIsProduct(String isProduct) {
		this.isProduct = isProduct;
	}
	
	@Length(min=1, max=200, message="商品编码长度必须介于 1 和 200 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=500, message="关键词长度必须介于 0 和 500 之间")
	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	
	@Length(min=1, max=5, message="是否上架长度必须介于 1 和 5 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@NotNull(message="库存不能为空")
	public Integer getInventory() {
		return inventory;
	}

	public void setInventory(Integer inventory) {
		this.inventory = inventory;
	}
	
	public Integer getBasicNum() {
		return basicNum;
	}

	public void setBasicNum(Integer basicNum) {
		this.basicNum = basicNum;
	}
	
	public Double getMarketPrice() {
		return marketPrice;
	}

	public void setMarketPrice(Double marketPrice) {
		this.marketPrice = marketPrice;
	}
	
	public Double getMarketPriceForShow() {
		return marketPriceForShow;
	}

	public void setMarketPriceForShow(Double marketPriceForShow) {
		this.marketPriceForShow = marketPriceForShow;
	}
	
	public Double getCostPrice() {
		return costPrice;
	}

	public void setCostPrice(Double costPrice) {
		this.costPrice = costPrice;
	}
	
	public Double getSalePrice() {
		return salePrice;
	}

	public void setSalePrice(Double salePrice) {
		this.salePrice = salePrice;
	}
	
	@NotNull(message="真实销售的价格不能为空")
	public Double getSellPrice() {
		return sellPrice;
	}

	public void setSellPrice(Double sellPrice) {
		this.sellPrice = sellPrice;
	}
	
	@Length(min=1, max=500, message="商品封面图片长度必须介于 1 和 500 之间")
	public String getCover() {
		return cover;
	}

	public void setCover(String cover) {
		this.cover = cover;
	}
	
	public String getCovers() {
		return covers;
	}

	public void setCovers(String covers) {
		this.covers = covers;
	}
	
	public String getClassifyIds() {
		return classifyIds;
	}

	public void setClassifyIds(String classifyIds) {
		this.classifyIds = classifyIds;
	}
	
	public String getDetailImages() {
		return detailImages;
	}

	public void setDetailImages(String detailImages) {
		this.detailImages = detailImages;
	}
	
	@Length(min=1, max=5, message="是否在电商页面中展现0=显示1=不显示长度必须介于 1 和 5 之间")
	public String getIsShow() {
		return isShow;
	}

	public void setIsShow(String isShow) {
		this.isShow = isShow;
	}

	public Event getEvent() {
		return event;
	}

	public void setEvent(Event event) {
		this.event = event;
	}
	
}